home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 634 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: news.mindlink.net!news
  2. From: genew@mindlink.bc.ca (Gene Wirchenko)
  3. Newsgroups: alt.msdos.programmer,comp.lang.c
  4. Subject: Re: Pascal program works but not C program!
  5. Date: Mon, 08 Jan 1996 02:08:27 GMT
  6. Organization: MIND LINK! - British Columbia, Canada
  7. Message-ID: <4cpuin$gqj@fountain.mindlink.net>
  8. References: <4cdpr2$psi@lugb.latrobe.edu.au>  <Pine.SV4.3.91-heb-2.04.960104114930.16292A-100000@cs.technion.ac.il> <4cp3vc$8nh@brahms.tfi.be>
  9. NNTP-Posting-Host: line019.nwm.mindlink.net
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. Tasmaniac@unicall.be (Tasmaniac) wrote:
  13.  
  14. [snip]
  15.  
  16. >>> void main(int argc,char *argv[])
  17. >>   ^-----------------------------This one too, but not too serious
  18. >why is this a problem ?
  19.  
  20. >>Another problem, not as serious as the previous one, although this is not
  21. >>the reason the C++ version might not work; main() should be defined
  22. >>returning int, not void. 
  23. >It's 100% legal to declare main as any of the following
  24.  
  25. [snipped garbage list]
  26.  
  27.      Kindly read the FAQ!  Per the C standard, main() must return int.
  28. That your compiler may not complain makes no difference.  It is not
  29. valid C.
  30.  
  31. Sincerely,
  32.  
  33. Gene Wirchenko
  34.  
  35.  
  36. C Pronunciation Guide:
  37.      y=x++;     "wye equals ex plus plus semicolon"
  38.      x=x++;     "ex equals ex doublecross semicolon"
  39.  
  40.